<div class="navbar navbar-fixed-top">
  <div class="navbar-inner">
    <div class="container">
      <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </a>
      <a class="brand" style="padding-top: 6px; padding-bottom: 2px;" href="/">
        <%= add_cdn_path(image_tag 'share_32.png', style:"margin-top: -2px;") %>
        <%= t 'website.title' %>
      </a>

      <div class="nav-collapse collapse">
        <form class="navbar-form pull-right">
          <% if signed_in? then %>
            <div class="btn-group">
              <%= link_to current_user.name, user_path(current_user), class: 'btn btn-info' %>
              <a class="btn btn-info dropdown-toggle" data-toggle="dropdown" href="#">
                <span class="caret"></span>
              </a>
              <ul class="dropdown-menu pull-right">
                <li><%= link_to add_cdn_path(image_tag 'message_16.png') + t('controller.messages'), user_messages_path(current_user) %></li>
                <li><a href="#"><%= add_cdn_path(image_tag 'article_16.png') %>我的文章（暂未完成）</a></li>
                <li><a href="#"><%= add_cdn_path(image_tag 'people_16.png') %>我关注的人（暂未完成）</a></li>
                <li><a href="#"><%= add_cdn_path(image_tag 'favorite_16.png') %>我的收藏夹（暂未完成）</a></li>
                <li class="divider"></li>
                <li><a href="#"><%= add_cdn_path(image_tag 'user_info_16.png') %>个人资料修改（暂未完成）</a></li>
              </ul>
            </div>
            <%= link_to '退出', signout_path, method: "delete", :class => 'btn btn-danger' %>
          <% else %>
            <%= link_to '注册', signup_path, :class => 'btn btn-primary' %>
            <%= link_to '登录', signin_path, :class => 'btn btn-primary' %>
          <% end %>
        </form>
        <ul class="nav pull-right" style="margin-right: 6px;">
          <li class="<%= controller_name == 'index' ? 'active' : '' %>"><a href="/"><%= t 'controller.index' %></a></li>
          <li class="<%= controller_name == 'experiences' ? 'active' : '' %>"><%= link_to (t 'controller.experiences'), experiences_path %></li>
          <li class="<%= controller_name == 'reviews' ? 'active' : '' %>"><%= link_to (t 'controller.reviews'), reviews_path %></li>
          <li class="<%= controller_name == 'jobs' ? 'active' : '' %>"><%= link_to (t 'controller.jobs'), jobs_path %></li>
          <li class="<%= controller_name == 'about' ? 'active' : '' %>"><a href="/about"><%= t 'controller.about'%></a>
        </ul>
      </div>
    </div>
  </div>
</div>